home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
utils
/
gemfsc15.lzh
/
AESSRC14.LZH
/
AESUTOB2.S
< prev
next >
Wrap
Text File
|
1989-08-26
|
2KB
|
70 lines
;*========================================================================
;*
;* AESFAST Public Domain GEM bindings.
;*
;* 08/28/89 - v1.3
;* Renamed objc_xywh to obj_xywh.
;*========================================================================
;*************************************************************************
;*
;* AESUTOB2.S - Object-related utilities 2 of n.
;* Non-standard utility functions.
;*
;* 08/28/89 - v1.3
;* Added obj_offxywh.
;*************************************************************************
.include "gemfast.sh" ; Pull in header file.
.extern _objc_offset ; we call this standard function.
;-------------------------------------------------------------------------
; obj_xywh - Return object's xywh into GRECT structure.
;
; void obj_xywh(tree, object, &grect);
;-------------------------------------------------------------------------
_obj_xywh::
.cargs #4,.ptree.l,.obj.w,.prect.l
move.l .prect(sp),a1
move.l .ptree(sp),a0
move.w .obj(sp),d0
muls #OBJ_SIZ,d0
lea ob_x(a0,d0.l),a0
move.l (a0)+,(a1)+
move.l (a0),(a1)
rts
;-------------------------------------------------------------------------
; obj_offxywh - Return object's xywh, adjusted to screen coordinates,
; into GRECT structure.
;
; void obj_offxywh(tree, object, &grect);
;-------------------------------------------------------------------------
_obj_offxywh::
.cargs #4,.ptree.l,.obj.w,.prect.l
move.l .prect(sp),a1
move.l .ptree(sp),a0
move.w .obj(sp),d0
move.w d0,d1
muls #OBJ_SIZ,d0
move.l ob_w(a0,d0.l),g_w(a1) ; fill in width/height
pea g_y(a1) ; ptr to prect->g_x
pea g_x(a1) ; ptr to prect->g_y
move.w d1,-(sp) ; obj number
move.l a0,-(sp) ; ptr to tree
jsr _objc_offset ; call objc_offset to fill in x/y
lea 14(sp),sp ; clean up stack
rts
; end of code